import request from '@/utils/request'

//  获取商品规格列表
export function listSpec(query){
  return request({
    url: '/manager/goods/spec/list',
    method: 'get',
    params: query
  })
}

//  获取商品规格列表
export function listSpecAll(query){
  return request({
    url: '/manager/goods/spec/listAll',
    method: 'get',
    params: query
  })
}


//  添加商品规格
export function addSpec(data){
  return request({
    url: '/manager/goods/spec',
    method: 'post',
    data: data
  })
}

//  编辑商品规格
export function editSpec(data){
  return request({
    url: '/manager/goods/spec',
    method: 'put',
    data: data
  })
}

// 删除商品规格
export function delSpec(ids) {
  return request({
    url: '/manager/goods/spec/' + ids,
    method: 'delete'
  })
}
